package dataImport.model;

import dataImport.model.abstracts.AbstractEntity;


public class CustomAction extends AbstractEntity {

	private static final long serialVersionUID = -3345785965324991345L;

	private Command command;

	public CustomAction(final String id, final Command command) {
		super(id);
		this.command = command;
	}

	public Command getCommand() {
		return this.command;
	}

	public void setCommand(Command command) {
		this.command = command;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + ((this.command == null) ? 0 : this.command.hashCode());
		return result;
	}

	@Override
	public boolean equals(java.lang.Object obj) {
		if (this == obj) {
			return true;
		}
		if (!super.equals(obj)) {
			return false;
		}
		if (this.getClass() != obj.getClass()) {
			return false;
		}
		CustomAction other = (CustomAction) obj;
		if (this.command == null) {
			if (other.command != null) {
				return false;
			}
		}
		else if (!this.command.equals(other.command)) {
			return false;
		}
		return true;
	}
}
